

<%@ page import="mileena.AppPlace" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'appPlace.label', default: 'AppPlace')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${appPlaceInstance}">
            <div class="errors">
                <g:renderErrors bean="${appPlaceInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${appPlaceInstance?.id}" />
                <g:hiddenField name="version" value="${appPlaceInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="appAddress"><g:message code="appPlace.appAddress.label" default="App Address" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'appAddress', 'errors')}">
                                    <g:select name="appAddress.id" from="${mileena.AppAddress.list()}" optionKey="id" value="${appPlaceInstance?.appAddress?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="appReview"><g:message code="appPlace.appReview.label" default="App Review" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'appReview', 'errors')}">
                                    <g:select name="appReview.id" from="${mileena.AppReview.list()}" optionKey="id" value="${appPlaceInstance?.appReview?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="appPlaceAmenity"><g:message code="appPlace.appPlaceAmenity.label" default="App Place Amenity" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'appPlaceAmenity', 'errors')}">
                                    <g:select name="appPlaceAmenity.id" from="${mileena.AppPlaceAmenity.list()}" optionKey="id" value="${appPlaceInstance?.appPlaceAmenity?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="appPlaceName"><g:message code="appPlace.appPlaceName.label" default="App Place Name" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'appPlaceName', 'errors')}">
                                    <g:textField name="appPlaceName" value="${appPlaceInstance?.appPlaceName}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="appPhone"><g:message code="appPlace.appPhone.label" default="App Phone" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'appPhone', 'errors')}">
                                    <g:textField name="appPhone" value="${appPlaceInstance?.appPhone}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="appPlaceSignUp"><g:message code="appPlace.appPlaceSignUp.label" default="App Place Sign Up" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'appPlaceSignUp', 'errors')}">
                                    <g:datePicker name="appPlaceSignUp" precision="day" value="${appPlaceInstance?.appPlaceSignUp}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="events"><g:message code="appPlace.events.label" default="Events" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'events', 'errors')}">
                                    
<ul>
<g:each in="${appPlaceInstance?.events?}" var="e">
    <li><g:link controller="appEvent" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="appEvent" action="create" params="['appPlace.id': appPlaceInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'appEvent.label', default: 'AppEvent')])}</g:link>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="users"><g:message code="appPlace.users.label" default="Users" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: appPlaceInstance, field: 'users', 'errors')}">
                                    
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
